import Vue from "vue";
import Vuex from "vuex";
import modules from "./modules";
import getters from "./getters";

import VuexPersistence from "vuex-persist"
Vue.use(Vuex);
// const debug = process.env.NODE_ENV !== "production";



const vuexLocal = new VuexPersistence({
  storage: window.localStorage  //这里可以改变存储方式，默认是localStorage
})



export default new Vuex.Store({
  modules,
  getters,
  plugins: [vuexLocal.plugin],
  // strict: debug
});
